#!/bin/ksh

set -x

cd /home/haesbaert/src/mdnsd
make clean
version=$(grep '#define MDNS_VERSION ' version.h | \
	sed 's/#define MDNS_VERSION //' | \
	sed 's/\"//g' |
	cut -d ' ' -f 1)
cat <<EOF > /tmp/distfiles
mdnsd/mdnsd
mdnsd/mdnsctl
mdnsd/TODO
mdnsd/README
mdnsd/Makefile
mdnsd/version.h
EOF

tar -s "/mdns\//openmdns-$version\//g" \
	-C ../ -czvf openmdns-$version.tar.gz -I /tmp/distfiles

